package com.ylb.rent.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 import com.ylb.rent.dao.ApartmentStuffMapper;
import  com.ylb.rent.entity.ApartmentStuff;
import com.ylb.rent.service.IApartmentStuffService;

/**
 * 公寓设施Service业务层处理
 * 
 * @author ylb
 * @date 2023-06-29
 */
@Service
public class ApartmentStuffServiceImpl extends ServiceImpl<ApartmentStuffMapper,ApartmentStuff> implements IApartmentStuffService
{
    @Autowired
    private ApartmentStuffMapper apartmentStuffMapper;

    /**
     * 查询公寓设施
     * 
     * @param id 公寓设施主键
     * @return 公寓设施
     */
    @Override
    public ApartmentStuff selectApartmentStuffById(Long id)
    {
        return apartmentStuffMapper.selectApartmentStuffById(id);
    }

    /**
     * 查询公寓设施列表
     * 
     * @param apartmentStuff 公寓设施
     * @return 公寓设施
     */
    @Override
    public List<ApartmentStuff> selectApartmentStuffList(ApartmentStuff apartmentStuff)
    {
        return apartmentStuffMapper.selectApartmentStuffList(apartmentStuff);
    }

    /**
     * 新增公寓设施
     * 
     * @param apartmentStuff 公寓设施
     * @return 结果
     */
    @Override
    public int insertApartmentStuff(ApartmentStuff apartmentStuff)
    {
        return apartmentStuffMapper.insertApartmentStuff(apartmentStuff);
    }

    /**
     * 修改公寓设施
     * 
     * @param apartmentStuff 公寓设施
     * @return 结果
     */
    @Override
    public int updateApartmentStuff(ApartmentStuff apartmentStuff)
    {
        return apartmentStuffMapper.updateApartmentStuff(apartmentStuff);
    }

    /**
     * 批量删除公寓设施
     * 
     * @param ids 需要删除的公寓设施主键
     * @return 结果
     */
    @Override
    public int deleteApartmentStuffByIds(Long[] ids)
    {
        return apartmentStuffMapper.deleteApartmentStuffByIds(ids);
    }

    /**
     * 删除公寓设施信息
     * 
     * @param id 公寓设施主键
     * @return 结果
     */
    @Override
    public int deleteApartmentStuffById(Long id)
    {
        return apartmentStuffMapper.deleteApartmentStuffById(id);
    }
}
